home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / AddOns / Components / Cell Control / DATA1.CAB / DELPHIDM / UFormula.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1998-01-11  |  1.4 KB  |  58 lines

  1. unit UFormula;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   Tempunit, ComCtrls, StdCtrls, Buttons, OleCtrls, CELLLib_TLB, ExtCtrls;
  8.  
  9. type
  10.   TFFormula = class(TTemplate)
  11.     BitBtn2: TBitBtn;
  12.     procedure FormShow(Sender: TObject);
  13.     procedure BitBtn2Click(Sender: TObject);
  14.   private
  15.     { Private declarations }
  16.   public
  17.     { Public declarations }
  18.   end;
  19.  
  20. var
  21.   FFormula: TFFormula;
  22.  
  23. implementation
  24.  
  25. {$R *.DFM}
  26.  
  27. procedure TFFormula.FormShow(Sender: TObject);
  28. begin
  29.   inherited;
  30.   Cell1.DoSetCellString( 0, 1, 'Jan');
  31.   Cell1.DoSetCellString( 1, 1, 'Feb');
  32.   Cell1.DoSetCellString( 2, 1, 'Mar');
  33.   Cell1.DoSetCellString( 3, 1, '1 Quarter');
  34.   Cell1.DoSetCellString( 4, 1, '1 year');
  35.  
  36.   Cell1.DoSetCellValue( 0, 2, 567.5);
  37.   Cell1.DoSetCellValue( 1, 2, 679.3);
  38.   Cell1.DoSetCellValue( 2, 2, 368.3);
  39.  
  40.   Cell1.DoSetFormula( 3, 2, 'a3+b3+c3');
  41.   Cell1.DoSetFormula( 4, 2, 'd3*4');
  42.  
  43.   Cell1.PageLabelVisible := False;
  44. end;
  45.  
  46. procedure TFFormula.BitBtn2Click(Sender: TObject);
  47. begin
  48.   inherited;
  49.       MESSAGEdlg('CELL support 4 data types: Sting, number, unit and region '+
  50.       'You can useing Wizard or you can defined yourself function. '+
  51.       'All of the common operate such as copy, cut, add ,square can be '+
  52.       'process freely. And it support extral function. More information '+
  53.       'please refer to the manual.', mtInformation,[mbOk], 0);
  54.  
  55. end;
  56.  
  57. end.
  58.